package hsp.admin.app.base.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import hsp.admin.app.base.mapper.MenuMapper;
import hsp.admin.app.base.po.MenuPO;
import hsp.admin.app.base.service.IMenuService;
import hsp.admin.app.base.info.MenuInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class MenuServiceImpl extends ServiceImpl<MenuMapper, MenuPO> implements IMenuService {

    private final MenuMapper mapper;

    @Autowired
    public MenuServiceImpl(
        MenuMapper mapper
    ){
        this.mapper = mapper;
    }

    @Override
    public List<MenuInfo> fetchInfo(long roleId) {
        return mapper.selectInfo(roleId);
    }

}
